package hammersmith.local.util;

import hammersmith.local.management.ShopManagement;
import hammersmith.local.persistence.DBHandler;
import hammersmith.local.valueobjects.Article;
import hammersmith.local.valueobjects.Customer;
import hammersmith.local.valueobjects.Employee;

import java.io.File;
import java.io.IOException;

/**
 * 
 * Klasse zum erstellen einer leeren Shop-Datenbank (XML)
 * 
 * @author hammersmith
 *
 */
public class AddingKrams {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		try {
			new File("db/20Bucks-Shop_new.xml").createNewFile();
		} catch (IOException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		DBHandler handler = new DBHandler();
		
		ShopManagement shop = new ShopManagement("Hammersmith-Shop","www.hammersmith.to");
		
		Employee e = new Employee("Paul", "Hans-Peter", "Glockenturm 3", "38518", "Gifhorn", 12345, "feuer1");
		Customer c = new Customer("Gurke", "Gerda", "Hauptstrasse 12", "83239", "Gurkenheim", 99999, "ggurke@aol.com","feuer1");
		//Article a = new Article("Hose", "SpleaserPant", 4, "32", 99.99F,"lsadq", "White");
		
		shop.getCustomerManagement().getCustomerList().add(c);
		shop.getEmployeeManagement().getEmployeeList().add(e);
		//shop.getArticleManagement().getArticleList().add(a);
		
		handler.saveShop(shop);
		
	}
}
// TOP!!!!! :D :D